package com.ruoyi.HKISAPI.service;

import com.ruoyi.HKISAPI.controller.IsapiDemoController;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;

import javax.annotation.PostConstruct;
/**
* @author
* @date
* @desc 设置初始化 bean 执行初始化方法
 */
@Service
public class DeviceService {

    @Value("${hk.non_subscription}")
    Boolean HK_Non_Subscription;

    @Autowired
    private IsapiDemoController isapiDemoController;

    @PostConstruct
    public void initializeDevices() {
        System.out.println("HKISAPI 这里放置连接设备或者其他初始化逻辑");
        // 这里放置连接设备或者其他初始化逻辑
    }
    @PostConstruct
    public void initializeDevices2() {

    if (HK_Non_Subscription){

        System.out.println("HK_Non_Subscription启用");
        isapiDemoController.testDev3("f0001",null);
    }else {
        System.out.println("HK_Non_Subscription未启用");
    }
    //
    }
}
